import request from '@/utils/request'
import base from '@/api/base'

const userApi = {
  personalInfo: base.api + '/family/user/personal/info', // 查询个人信息
  loginPwd: base.api + '/family/auth/api/login/pwd', // 账号密码登录
}

/**
 * 获取用户信息
 * @returns
 */
export const getUserInfo = () => {
  return request({
    url: userApi.personalInfo,
    method: 'get',
  })
}

/**
 * 账号密码登录
 * @param {*} data
 * @returns
 */
export const login = (data) => {
  return request({
    url: userApi.loginPwd,
    method: 'post',
    data,
  })
}
